var exec = require('cordova/exec');

module.exports = {
    //test
    test: function () {
        exec(null, null, "webCameraManager", "test", []);
    },

    //初始化
    init: function () {
        exec(null, null, "webCameraManager", "init", []);
    },
    //登录
    login: function (arr,success,error) {
        exec(success, error, "webCameraManager", "login", arr);
    },
    //获取根节点信息
    getRootInfo:function(success,error){
        exec(success,error,"webCameraManager","getRootInfo",[]);
    },
    //获取组织、设备i
    getGroup:function(arr,success,error){
        exec(success,error,"webCameraManager","getGroup",arr);//szCoding
    },
    //获取频道信息
    getChannel:function(arr,success,error){
        exec(success,error,"webCameraManager","getChannel",arr);//szId,nEncChannelChildCount
    },
    //跳转到实时播放界面
    toRealPlay:function(arr,success,error){
        exec(success,error,"webCameraManager","toRealPlay",arr);//szName szId
    },
    //跳转到回放界面
    toBackPlay:function(arr,success,error){
        exec(success,error,"webCameraManager","toBackPlay",arr);
    },
    //登出
    logout:function(success,error){
        exec(success,error,"webCameraManager","logout",[]);
    }
};
